<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>conpanyManage.jsp</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css"
	type="text/css"></link>
<link rel="stylesheet" href="plugins/FlatUI/dist/css/flat-ui.css"
	type="text/css"></link>
<link rel="shortcut icon" href="plugins/FlatUI/dist/img/favicon.ico">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery.js">
</script>
<script type="text/javascript" src="plugins/FlatUI/dist/js/flat-ui.js">
</script>
<script type="text/javascript" src="plugins/bootstrap/js/messager.js">
</script>
<script type="text/javascript">
	function deleteProduct(id) {
		$.messager.confirm("确认删除", "确认要删除吗?删除后不能恢复", function() {
			location.href = "deleCompany.action?companyID=" + id;
		});
	}
</script>
</head>
<body style="padding: 5px 10px">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">企业管理</h3>
		</div>
		<div class="panel-body">
			<a href="pages/backend/companyAdd.jsp"
				class="btn btn-primary btn-default"> 添加 <span
				class="glyphicon glyphicon-plus"></span>
			</a>
			<table class="table table-hover">
				<thead>
					<tr>
						<th>企业名称</th>
						<th>佣金比例</th>
						<th>企业详情</th>
						<th>ICO</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${companyList}" var="company">
						<tr>
							<td>${company.companyName}</td>
							<td>${company.financingInReturn}%</td>
							<td>${company.companyDetailSubStr}</td>
							<td><img alt="图片加载失败" src="${resourse}${company.imgURL}"
								height="100" width="100"></td>
							<td><a class="btn btn-primary  btn-xs btn-warning"
								href="updateCompany.action?companyID=${company.companyID}">
									修改 <span class="glyphicon glyphicon-pencil"></span>
							</a> <a class="btn btn-primary btn-xs btn-success"
								href="selectCompanyDetail.action?companyID=${company.companyID}">
									详情 <span class="glyphicon glyphicon-list-alt"></span>
							</a> <a class="btn btn-primary btn-xs btn-danger" href="javascript:;"
								onclick="deleteProduct('${company.companyID}')"> 删除 <span
									class="glyphicon glyphicon-remove"></span>
							</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>
